import { Column, Entity, PrimaryGeneratedColumn, ManyToOne, JoinColumn } from "typeorm";
import { UserAccount } from './user_account.entity'

@Entity()
export class UserHobby {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    name: string;


    @ManyToOne(type => UserAccount, userAccount => userAccount.hobbies)
    @JoinColumn()
    userAccount: UserAccount
}